﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Windows
{
    public static class PhoneSystemExtensions
    {
        public static bool IsVisible(this FrameworkElement fe)
        {
            if (fe == null) return false;

            return fe.Visibility == Visibility.Visible;
        }

        public static bool IsNotVisible(this FrameworkElement fe)
        {
            return !fe.IsVisible();
        }

        public static void Hide(this FrameworkElement fe)
        {
            if (fe != null)
                fe.Visibility = Visibility.Collapsed;
        }

        public static void Show(this FrameworkElement fe)
        {
            if (fe != null)
                fe.Visibility = Visibility.Visible;
        }
    }
}
